import Vue from 'vue'
import App from './App.vue'
import router from './router'
import 'lib-flexible'
import store from '@/store'
import FastClick from 'fastclick'
import 'utils/permission'
import SvgIcon from 'components/SvgIcon'
import '@/icons' // icon
import '@/style/common.scss'
import '@/assets/css/public.scss'        //组件通用样式
import { Lazyload } from 'vant'
import defaultSettings from '@/settings'

//全局公用方法
import utils from '@/assets/js/utils';
Vue.prototype.$utils = utils;

//axios
import axios from './axios';
Vue.prototype.$axios = axios;

//api地址
import api from './api/api';
Vue.prototype.$api = api;

//js-cookie
import Cookies from 'js-cookie'
Vue.prototype.$Cookies = Cookies;

//生成二维码
import QRCode from 'qrcodejs2'
Vue.prototype.$QRCode = QRCode;


FastClick.attach(document.body)

// options 为可选参数，无则不传
Vue.use(Lazyload)

Vue.component('svg-icon', SvgIcon)

if (process.env.NODE_ENV === 'development' && defaultSettings.vconsole) {
  const VConsole = require('vconsole')
  // eslint-disable-next-line
  const my_console = new VConsole()
}
// var vConsole = new VConsole(option)

Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
